  function createReader(cb) {
    return function(event) {
      const file = event.target.files[0];
      const fr = new FileReader();
      fr.onload = function() {
        var img = new Image();
        img.src = fr.result;
        // img.style.width = "160px";
        // img.style.height = "120px"; 
        // img.style.margin = "10px";

        var button = document.createElement("div");
        button.classList.add("delete");
        button.innerHTML = "X";
        // button.style.position = "absolute";
        // button.style.zIndex = "999";
        // button.style.width = "3px";
        // button.style.height = "3px";

        var div = document.createElement("div");
        div.classList.add("img");
        // div.style.position = "relative";

        div.appendChild(img);
        div.appendChild(button);

        cb(div);
      }
      fr.readAsDataURL(file);

      event.target.value = "";
    }
  }
